﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BPM.Database.Migrations.Migrations
{
    public partial class updatedb202203081719 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "OrgType",
                table: "sys_org",
                type: "TEXT",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "INTEGER",
                oldComment: "机构类型-品牌_1、总店(加盟/直营)_2、直营店_3、加盟店_4");

            migrationBuilder.AddColumn<string>(
                name: "Icon",
                table: "sys_app",
                type: "TEXT",
                maxLength: 20,
                nullable: true,
                comment: "图标");

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926946L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "一级", "一级" });

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926947L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "二级", "二级" });

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926948L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "三级", "三级" });

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926949L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "四级", "四级" });

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910539L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910540L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910541L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910542L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910543L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910544L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910545L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910546L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910547L,
                column: "OrgType",
                value: null);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910548L,
                column: "OrgType",
                value: null);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Icon",
                table: "sys_app");

            migrationBuilder.AlterColumn<int>(
                name: "OrgType",
                table: "sys_org",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0,
                comment: "机构类型-品牌_1、总店(加盟/直营)_2、直营店_3、加盟店_4",
                oldClrType: typeof(string),
                oldType: "TEXT",
                oldNullable: true);

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926946L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "品牌", "品牌" });

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926947L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "总店(加盟/直营)", "总店(加盟/直营)" });

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926948L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "直营店", "直营店" });

            migrationBuilder.UpdateData(
                table: "sys_dict_data",
                keyColumn: "Id",
                keyValue: 142307070926949L,
                columns: new[] { "Remark", "Value" },
                values: new object[] { "加盟店", "加盟店" });

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910539L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910540L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910541L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910542L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910543L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910544L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910545L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910546L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910547L,
                column: "OrgType",
                value: 0);

            migrationBuilder.UpdateData(
                table: "sys_org",
                keyColumn: "Id",
                keyValue: 142307070910548L,
                column: "OrgType",
                value: 0);
        }
    }
}
